﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;

namespace Core.CMS.ServerControls
{
    public class ContentBlock : Control
    {
        string content;

        public string Content
        {
            get { return content; }
            set { content = value; }
        }

        public ContentBlock()
        {

        }

        protected override void OnPreRender(EventArgs e)
        {
            if (content != null)
            {
                if (content.Length > 0)
                    Controls.Add(Page.ParseControl(content));
                else
                    Controls.Add(new LiteralControl("<div style='height:70px;'>&nbsp;</div>"));
            }
        }
    }
}
